
<@bootstrap.head>
    <link rel="stylesheet" href="<@spring.url "/resources/css/matrix-style.css" />">
    <link rel="stylesheet" href="<@spring.url "/resources/css/matrix-media.css" />">
	<script src="<@spring.url "/resources/js/matrix.js" />"></script> 
</@bootstrap.head >

<body  id="body11" style="height: 533px;">
    <!--Header-part-->
    <div id="header">
      <h1 style="width:300px;"><a href="#">HZBAT管理平台</a></h1>
    </div>
    <!--start-top-serch-->
    <div id="search" style="top:15px;">
       	<font size="3px" color="white" >时间：<span id="timeShow"></span></font>
    </div>
    <!--close-top-serch-->

    <!--sidebar-menu-->
    <div id="sidebar" style="overflow-y: auto; overflow-x: hidden; height: 563px;">
        <ul style="display: block;">
            <li class="submenu"> 
                <a  class="menu_b active" link="<@spring.url "/registerNode/getNodesConfiguere" />">
                    <span>集群监控</span> 
                </a>
                <ul style="display: block;">
                    <li class=""><a class="menu_a" link="<@spring.url "/registerNode/getNodesConfiguere" />"></i>注册节点</a></li>
                </ul>
            </li>
            <li class="submenu"> 
                <a class="menu_b" link="<@spring.url "/pmHzbatSchedule/list" />">
                    <span>计划批量维护</span> 
                </a>
                <ul name="dynamicMenuCompile" style="display: block;">
                 <#list pmHzbatScheduleList as pmHzbatSchedule>
                    <li class=""><a class="menu_a" link="<@spring.url "/index/scheduleCompile?scheduleName=${pmHzbatSchedule.scheduleName}&orderIndex=${pmHzbatSchedule.orderIndex}&scheduleDesc=${pmHzbatSchedule.scheduleDesc}&beginDatetime=${pmHzbatSchedule.beginDatetime}&endDatetime=${pmHzbatSchedule.endDatetime}&progress=${pmHzbatSchedule.progress}" />"></i>${pmHzbatSchedule.scheduleDesc}(${pmHzbatSchedule.scheduleName})</a></li>
                 </#list>
                </ul>
            </li>
            <li class="submenu"> 
                <a class="menu_b" link="">
                    <span>计划运行监控</span> 
                </a>
                <ul name="dynamicMenu" style="display: block;">
                 <#list pmHzbatScheduleList as pmHzbatSchedule>
                    <li class=""><a class="menu_a" link="<@spring.url "/index/schedule?scheduleName=${pmHzbatSchedule.scheduleName}&orderIndex=${pmHzbatSchedule.orderIndex}&scheduleDesc=${pmHzbatSchedule.scheduleDesc}&beginDatetime=${pmHzbatSchedule.beginDatetime}&endDatetime=${pmHzbatSchedule.endDatetime}&progress=${pmHzbatSchedule.progress}" />"></i>${pmHzbatSchedule.scheduleDesc}(${pmHzbatSchedule.scheduleName})</a></li>
                 </#list>
                </ul>
            </li>
        </ul>
    </div>
    <div id="content">
        <iframe src="<@spring.url "/registerNode/getNodesConfiguere" />" id="iframe-main" frameborder="0" style="width: 100%; height: 523px;"></iframe>
    </div>
    <div id="" class="navbar-fixed-bottom" style="background-color:#1f262d;height:50px;">
    	<div style="text-align:center;height:30px;line-height:30px;">
    		<span>Copyright&nbsp;&copy;&nbsp;2017 </span>
    	</div>
    </div>
    <script type="text/javascript">
    
    //初始化相关元素高度
    function init(){
        $("body").height($(window).height()-80);
        $("#iframe-main").height($(window).height()-90);
        $("#sidebar").height($(window).height()-50);
    }

    $(function(){
        init();
        $(window).resize(function(){
            init();
        });
        
      //时间
		var t = null;
		t=setTimeout(time,1000);
		
		function time(){
			  clearTimeout(t);
			  dt = new Date();
			  var year = dt.getFullYear();
			  var month = dt.getMonth()+1;
			  var day = dt.getDate()
			  var h = dt.getHours();
			  var m = dt.getMinutes();
			  var s = dt.getSeconds();
			  document.getElementById("timeShow").innerHTML = year+"-"+getTure(month)+"-"+getTure(day)+" "+getTure(h)+":"+getTure(m)+":"+getTure(s);
			  t = setTimeout(time,1000);
	   }
		
    });
	function getTure(str){
		
		if(str.toString().length<2){
			return "0"+str;
		}else{
			return str;
		}
		
	}
	
	var Menu = {} ;
	Menu.li = '<@compress singline=true>
				<li class=""><a class="menu_a" link="<@spring.url "/index/schedule?scheduleName=%{scheduleName}" />"></i>%{scheduleDesc}(%{scheduleName})</a></li>
			   </@compress>';
    Menu.liCompile =  '<@compress singline=true>
				<li class=""><a class="menu_a" link="<@spring.url "/index/scheduleCompile?scheduleName=%{scheduleName}" />"></i>%{scheduleDesc}(%{scheduleName})</a></li>
			   </@compress>';
	
	//刷新计划列表菜单
	function FlushDynamicMenu(){
		$.ajax({
			url:"<@spring.url "/index/flushDynamicMenu" />",
			data:{},
			type:"post",
			success:function(text){
				if(text.success){
					var data = text.data;
					var MenuCompileHtml = "" ;
					var MenuHtml = "" ;
					if(data.length>0){
					  for(var i=0;i<data.length;i++){
					  	MenuCompileHtml += C._template(Menu.liCompile,data[i])
					  	MenuHtml += C._template(Menu.li,data[i])
					  }
					  $("[name='dynamicMenuCompile']").html(MenuCompileHtml);
					  $("[name='dynamicMenu']").html(MenuHtml);
					}
				}
			}
		});
	}
	
    </script>
</body>
</html>

